<template>
  <div class="conversion_box">
    <template v-if="InfoData.clickCount!='--'">
      <div class="cb_box">
        <div class="cb_item">
          <div class="progress_box"><i :style="'width:'+'100%'"></i></div>
          <div class="percentage_box"><i>{{comInfoData.seeClickPerCent}}</i></div>
          <div class="conversion_text">累计观看人次{{format_num(comInfoData.lookPeople)}}</div>
          <i class="arrow"></i>
        </div>
        <div class="cb_item">
          <div class="progress_box"><i :style="'width:'+comInfoData.seeClickPerCent"></i></div>
          <div class="percentage_box"><i>{{comInfoData.clickVolumePerCent }}</i></div>
          <div class="conversion_text">商品点击次数{{format_num(comInfoData.clickCount)}}</div>
          <i class="arrow a2"></i>
        </div>
        <div class="cb_item">
          <div class="progress_box"><i :style="'width:'+comInfoData.clickVolumePerCent"></i></div>
          <div class="conversion_text">商品销量{{format_num(comInfoData.liveVolume)}}</div>
        </div>
      </div>
      <div class="foot_text">整体转换率 {{comInfoData.volumeSeePerCent}}</div>
    </template>
    <div class="zanwu" v-else>
      <img src="@/assets/shi/zanwushuju.png" />
      <p>暂无数据</p>
    </div>
  </div>
</template>

<script>
export default {
    props: ["InfoData"],
    data() {
        return {};
    },
    components: {},
    computed: {
      comInfoData(){
        return this.InfoData
      }
    },
    created() {},
    mounted() {},
    watch: {},
    methods: {},
};
</script>

<style scoped lang="less">
.conversion_box{
  width: 408px;
  height: 100%;
  margin: 0 auto;
  .zanwu{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: #b5b5b5;
  }
  .cb_box{
    position: relative;
    margin-top: 52px;
    &:before{     
      content: '';
      position: absolute;
      width:2px;
      height: 99%;
      background-color: #f5f5f5;
      top: .5%;
      left:170px;
    }
  }
  .foot_text{
    margin-top: 26px;
    // text-align: center;
    font-size:14px;
    color:#222;
    padding-left: 230px;
  }
  .cb_item{
    position: relative;
    padding-left: 170px;
    .arrow{
      position: absolute;
      display:block;
      right: -32px;
      top:18px;
      width:26px;
      height:86px;
      background: url('~@/assets/shi/conversion_arrow.png');
      background-size: 100% 100%;
      &.a2{
        top:28px;
      }
    }
    .progress_box{
      position: relative;
      width: 240px;
      height: 35px;
      background-color: #f5f5f5;
      border-radius: 4px;
      overflow: hidden;
      z-index: 1;
      i{
        position: absolute;
        left: 0px;
        top: 0;
        display: inline-block;
        height: 100%;
        background-color: #fd7f2c;
      }
    }
    .percentage_box{
      position: relative;
      height: 55px;
      display:flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      i{
        display: inline-block;
        width: 79px;
        height: 37px;
        line-height: 37px;
        font-size: 14px;
        font-style: normal;
        color: #222;
        // background: url('~@/assets/shi/conversion_numbg.png');
        background: #f5f5f5;
        border-radius: 0 0 70% 70%;
      }
    }
    .conversion_text{
      position: absolute;
      top:0;
      left:0;
      width:160px;
      height:35px;
      line-height:35px;
      text-align: center;
      font-size:14px;
      border:1px solid #e5e5e5;
      border-radius: 4px;
      color: #555555;
      box-sizing: border-box;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }
  }
}
</style>
